﻿@model List<ClassifiedAds.IdentityServer.Models.IdentityResourceModels.IdentityResourceModel>

<div class="row">
    <div class="col-12">
        <h2>Identity Resources</h2>
    </div>

    <div class="col-12">
        <a asp-action="Add" class="btn btn-outline-primary mb-3"><span class="oi oi-plus"></span> Add Identity Resource</a>
    </div>

    <div class="col-12">
        @*@await Html.PartialAsync("Common/Search", new Search { Action = "IdentityResources", Controller = "Configuration" })*@
    </div>
</div>

<div class="row">
    <div class="col-12">
        <div class="table-responsive">
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th></th>
                        <th>Name</th>
                        <th>Display Name</th>
                        <th>Description</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var identity in Model)
                    {
                    <tr>
                        <th scope="row"><a class="btn btn-primary" asp-action="Edit" asp-route-id="@identity.Id">Edit</a></th>
                        <td>@identity.Name</td>
                        <td>@identity.DisplayName</td>
                        <td>@identity.Description</td>
                        <td>
                            <a class="btn btn-danger" asp-action="Delete" asp-route-id="@identity.Id"><span class="oi oi-x"></span></a>
                        </td>
                    </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-12">
        @*@await Html.PartialAsync("Common/Pager", new Pager { Action = "IdentityResources", PageSize = Model.PageSize, TotalCount = Model.TotalCount, EnableSearch = true, Search = ViewBag.Search })*@
    </div>
</div>